To run this replication archive, do the following:

1. Download mixture_irt.R and bigsurveys_recoded4.dta from the replication archive for Fowler et al. 2023, APSR, Moderates: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/THU75A.

2. Prepare the following folder structure, placing the two files you downloaded above inside the Moderates Replication Archive folder, as shown:

├── Moderates Replication Archive
│   ├── IRT_mixing
│   │   └── mixture_irt.R
│   └── bigsurveys_recoded4.dta
├── Moderates_SM.Rmd
├── README.txt
└── Regeneration
    ├── outputs
    ├── roll_call_regeneration_code.R
    └── run_replications.R

3. Next, to produce Downsian_Share_Regenerated_Observed.png, run "Regeneration/run_replications.R".

4. Finally, to produce the rest of the analysis, run Moderates_SM.Rmd. The figures and tables in the paper are made in the following lines of the Rmd file:

- Figure 1: See lines 120-230.
- Figure 2: See lines 325-411.
- Table 1: See lines 418-582.

The .Rmd document produces the Online Appendix itself. Therefore, the code to make the Online Appendix figures and tables appears in the .Rmd file directly above where those figures appear in the compiled document.

Please note that the code will not run on Windows because of the doMC package.